#pragma once 
#include <iostream>
#include <string>

#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

#include "bglProgram.h"
#include "bglTexture2D.h"
#include "bglCamera.h"

class Box
{
private:
    unsigned int m_VBO; //顶点缓冲区对象
	unsigned int m_VAO; //顶点数组对象
	
	unsigned int m_textureId;  //纹理

    glm::vec3 m_position = glm::vec3(0.0f);
    glm::vec3 m_scale    = glm::vec3(1.0f);
	glm::vec3 m_rotation = glm::vec3(0.0f);

    BGLCamera* m_camera;

	BGLProgram m_program;

private:
    void Updata();
 
public:
    Box();
    ~Box();

    void Begin();
    void End();

    void SetCanera(BGLCamera* camera);
    void SetTexture(std::string path);
    void SetPosition(glm::vec3 position);
    void SetScale(glm::vec3 scale);
    void SetRotation(glm::vec3 rotation);
};


